<template>
  <div>
    <h2>指令的修饰符</h2>
    <div class="box" @click="bb">
      <a href="https://www.baidu.com/" @click.prevent.stop="aa">跳转到百度</a>
    </div>
    <!-- 按键修饰符,只能给keyup,keydown绑定 -->
    <input type="text" @keyup.enter="cc" />
  </div>
</template>

<script>
export default {
  methods: {
    aa() {
      console.log(123);
    },
    bb() {
      console.log(456);
    },
    cc(e) {
      console.log(e.target.value); //输出 输入框的值
    },
  },
};
</script>

<style>
.box {
  width: 200px;
  height: 100px;
  background-color: red;
}
</style>